import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
type int = number;
//class SPoint

export class SPoint extends IMessageBase {
  constructor(arg1: Boolean = false) {
    
    super();if (arg1) {
      MessageManager.instance().regist(this);
    }
    return;
  }

  public /* override */ getType(): int {
    return this._type;
  }

  public /* override */ clone(): IMessageBase {
    return new SPoint();
  }

  public /* override */ __write(arg1: SerializeStream): void {
    arg1.writeShort(this.x);
    arg1.writeShort(this.y);
    return;
  }

  public /* override */ __read(arg1: SerializeStream): void {
    this.x = arg1.readShort();
    this.y = arg1.readShort();
    return;
  }

  public /* const */ _type: int = 2;

  public /* var */ x!: int;

  public /* var */ y!: int;

  public static /* var */ _regist: SPoint = new SPoint(true);
}
